package com.szrt.spring.ch07.m04.student.service.impl;

import com.szrt.spring.ch07.m04.student.dao.StudentDao;
import com.szrt.spring.ch07.m04.student.service.StudentService;

public class StudentServiceImpl implements StudentService {
	
	
	private StudentDao studentDao;
	
	/**
	 * 学生id
	 */
	private Integer id;
	
	
	/**
	 * 学生姓名
	 */
	private String name;
	
	
	
	
	
	
	


	public void setName(String name) {
		this.name = name;
	}



	public void setId(Integer id) {
		this.id = id;
	}



	/**
	 * 1:通过set方法注入依赖属性StudentDao
	 */
	public void setStudentDao(StudentDao studentDao) {
		System.out.println("通过set方法注入依赖属性StudentDao...");
		this.studentDao = studentDao;
	}



	@Override
	public void save() {
		studentDao.save();
	}
	
	
}
